package com.yc.cloudvideo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author LYYT
 * @since 2022-08-03
 */

public class File implements Serializable {

    @TableField(exist = false)
    private List<Danmu> danmus;

    public List<Danmu> getDanmus() {
        return danmus;
    }

    public void setDanmus(List<Danmu> danmus) {
        this.danmus = danmus;
    }

    @TableField(exist = false)
    private User user;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
    public File(){}
    public File( String fname, LocalDateTime uploadTime, Long uid, String path) {
        this.fname = fname;
        this.uploadTime = uploadTime;
        this.uid = uid;
        this.path = path;
    }

    private static final long serialVersionUID = 1L;

    @TableId(value = "fid", type = IdType.AUTO)
    private Long fid;

    private String fname;

    private LocalDateTime uploadTime;

    private Long uid;

    private String path;


    public Long getFid() {
        return fid;
    }

    public void setFid(Long fid) {
        this.fid = fid;
    }

    public String getFname() {
        return fname;
    }

    public void setFname(String fname) {
        this.fname = fname;
    }

    public LocalDateTime getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(LocalDateTime uploadTime) {
        this.uploadTime = uploadTime;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    @Override
    public String toString() {
        return "File{" +
                "fid=" + fid +
                ", fname=" + fname +
                ", uploadTime=" + uploadTime +
                ", uid=" + uid +
                ", path=" + path +
                "}";
    }
}
